<!--  -->
<template>
<div class="member-page">
  <c-title :text="pluginName" :hide="false" ></c-title>
  <member-info :memberInfo="calendarInfo"></member-info>
  
  <van-tabs 
    v-model="active" 
    line-width="15" 
    title-active-color="var(--themeBaseColor)" 
    title-inactive-color="#00001C" 
    color="var(--themeBaseColor)"
    @click="memberTabOn"
    ref="actTab">
    <block v-for="(item,index) in memberTab" :key="index" >
      <van-tab :title="item.name" :name="item.val" ></van-tab>
    </block>
  </van-tabs>
  <template v-if="query.admin_type == 1">
    <div class="clock-list" v-if="activityList.length > 0">
      <block v-for="(item,index) in activityList" :key="index" >
        <clock-item :itemObj="item" :index="index" :clockStatus="0">
          <template v-slot:tag>
            <span class="tag" :class="[item.status == 2?'orange':'',item.status == 1?'green':'']">{{item.status_name}}</span>
          </template>
        </clock-item>
      </block>
    </div>
    <van-empty
      class="custom-image"
      :image="`${imgPath}check-in-rebate/awardEmpty.png`"
      description="暂无数据"
      v-else
    />
  </template>
  <template v-if="query.admin_type == 0">
    <div class="clock-list" v-if="clockList.length > 0">
      <block v-for="(item,index) in clockList" :key="index" >
        <clock-item :itemObj="item.activity" :startTime="item.created_at" :index="index" :clockStatus="1" :partId="item.id">
          <template v-slot:status>
            <span class="status" :class="[item.activity && item.activity.status == 2?'green-text':'']">{{item.activity && item.activity.status_name}}</span>
          </template>
        </clock-item>
      </block>
    </div>
    <van-empty
      class="custom-image"
      :image="`${imgPath}check-in-rebate/awardEmpty.png`"
      description="暂无数据"
      v-else
    />
  </template>
 
  
  <div class="mb40"></div>
</div>
</template>

<script>
import clockMember_controller from "./clockMember_controller";
export default clockMember_controller;
</script>
<style lang="scss" scoped>
/* @import url(); 引入公共css类 */
.ell {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  /* 定义显示的行数 */
  overflow: hidden;
}

.mb40 {
  height: 2.5rem;
}
.member-page ::v-deep .van-tabs__nav  {
  background-color: transparent;
}
.member-page ::v-deep .van-tabs__line {
  bottom: 1.25rem;
}
.member-page {
  .clock-list {
      margin:0.375rem 0.75rem 0 0.75rem;
      
    }
}
</style>